namespace ConsoleApp1;

public class New
{
    public static void t1()
    {
        var dict = new Dictionary<string, int>();
        dict["first"] = 10;
        dict["second"] = 20;
        dict["third"] = 30;

        Console.WriteLine(string.Join("; ", dict.Select(entry => $"{entry.Key}: {entry.Value}")));
        // Output:
        // first: 10; second: 20; third: 30
    }


    public static void t2()
    {
        var dict = new Dictionary<string, int>
        {
            ["first"] = 10,
            ["second"] = 20,
            ["third"] = 30
        };

        Console.WriteLine(string.Join("; ", dict.Select(entry => $"{entry.Key}: {entry.Value}")));
// Output:
// first: 10; second: 20; third: 30
    }

    public static void t3()
    {
        List<int> xs = new();
        List<int> ys = new(capacity: 10_000);
        List<int> zs = new() { Capacity = 20_000 };

        Dictionary<int, List<int>> lookup = new()
        {
            [1] = new() { 1, 2, 3 },
            [2] = new() { 5, 8, 3 },
            [5] = new() { 1, 0, 4 }
        };
    }

    public static void t4()
    {
        var example = new { Greeting = "Hello", Name = "World" };
        Console.WriteLine($"{example.Greeting}, {example.Name}!");
// Output:
// Hello, World!
    }
}